import time
import linecache

file_01 = "D:/k12日志分析测试/1.log"
file_02 = "D:/k12日志分析测试/2.txt"
file_03 = "D:/k12日志分析测试/newk12_center.log"


def main():
    start = time.time()
    total = 0
    with open(file_03, 'r', encoding='utf-8') as f:
        for line in f:
            total += 1
            # print(line)
    print(total)
    end = time.time()
    print('Running time: %.2f Seconds'%(end-start))

def mytest1():
    re = linecache.getlines(file_01)[0:5]
    print(re)

if __name__ == '__main__':
    mytest1()
